package syntax

class CCategory(_name:String = "")
{
    def name = _name

    def &(category:CCategory):CChain = CChain(this) & category

    def |(category:CCategory):CAlternatives = CChain(this) | CChain(category)

    def |(chain:CChain):CAlternatives = CChain(this) | chain

    override def hashCode() = name.hashCode

    override def equals(that:Any) = that != null && that.isInstanceOf[CCategory] && that.asInstanceOf[CCategory].name == name
}
